<%@include file="/WEB-INF/common/taglibs.jsp"%>
<script>
$(document).ready(function(){
	$(document).delegate("#print","click",function(){
		window.open("/admin/shop-order/${entity.id}/print/",'_blank');
		
	});
	
	
	$("#generate").click(function(){
	 var this_ = $(this);
			$.ajax({
				type : "POST",
				url :  '/admin/shop-order/${entity.id}/invoice/',
				dataType : "json",
				success : function(data) {
					if (data && data.state && (data.state.indexOf("ERROR") != -1)) {
						//																		alert(data.message);

					} else {
						if (data.message) {
							johnny.error(data.message);
						} else {	

							
							var x =$('<input class="span4" disabled="disabled" id="invoiceNo" name="invoiceNo"	type="text" />');
							x.val(data.entity);
							var p =	this_.parent().empty();
							p.html(x);
							p.append('<button class="btn btn-primary" id="print">Print</button>');	
							johnny.info('Your request has been processed successfully');
						}

					}
				}
			});
		 
		
	});

	
	
});



</script>
<div class="row-fluid">
	<div class="span12">
		<div class="centerContent">

			<div class="span12">

				<div class="page-header">
					<h4>Shop Order</h4>
				</div>

				<div style="margin-bottom: 20px;">
					<div class="tabbable tabs-left">
						<ul class="nav nav-tabs">
							<li class="active"><a href="#tab-basic" data-toggle="tab">Order
									Detail</a></li>
							<li class=""><a href="#payment-tab" data-toggle="tab">Payment
									Detail </a></li>
							<li class=""><a href="#shipping-tab" data-toggle="tab">Shipping
									Detail</a></li>
							<li class=""><a href="#product-tab" data-toggle="tab">Product</a></li>
							<li class=""><a href="#transation-tab" data-toggle="tab">History</a></li>
							<li class=""><a href="#customer-tab" data-toggle="tab">Customer</a></li>
							<li class=""><a href="#user-access-tab" data-toggle="tab">User
									Access</a></li>
						</ul>
						<div class="tab-content">
							<div class="tab-pane active" id="tab-basic">

								<!--ccy -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="ccy">Ccy :</label><input
												class="span4" id="ccy" name="ccy" type="text"
												value="${entity.ccy}" />
										</div>
									</div>
								</div>
								<!--totalMoney -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="totalMoney">TotalMoney
												:</label><input class="span4" id="totalMoney" name="totalMoney"
												type="text" value="${entity.totalMoney}" />
										</div>
									</div>
								</div>
								<!--orderId -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="orderId">OrderId
												:</label><input class="span4" id="orderId" name="orderId"
												type="text" value="${entity.orderId}" />
										</div>
									</div>
								</div>

								<!--invoiceNo -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="invoiceNo">Invoice
												No :</label>
													<div class="span4">
											<c:choose>
												<c:when test="${entity.invoiceNo eq null}">

                                 				   <button class="btn btn-primary" id="generate">Generate</button>

												</c:when>
												<c:otherwise>
											<input class="span4" disabled="disabled" id="invoiceNo" name="invoiceNo"
												type="text" value="${entity.invoiceNo}" /><button class="btn btn-primary" id="print">Print</button>
												</c:otherwise>
											</c:choose>
			                                </div>
										</div>
									</div>
								</div>
								<!--token -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="token">Token :</label><input
												class="span4" id="token" name="token" type="text"
												value="${entity.token}" />
										</div>
									</div>
								</div>
								<!--lastTransation -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="lastTransation">LastTransation
												:</label><input class="span4 datepicker" id="lastTransation"
												name="lastTransation" type="text"
												value="<fmt:formatDate pattern="yyyy-MM-dd" value="${entity.lastTransation}" />" />
										</div>
									</div>
								</div>
								<!--dateAdd -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="dateAdd">DateAdd
												:</label><input class="span4 datepicker" id="dateAdd" name="dateAdd"
												type="text"
												value="<fmt:formatDate pattern="yyyy-MM-dd" value="${entity.dateAdd}" />" />
										</div>
									</div>
								</div>
								<!--orderStatus -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3">Order Status :</label>
											<div class="span4 controls">
												<select name="orderStatus"><c:if
														test="${not empty orderStatuses}">
														<c:forEach var="single" items="${orderStatuses}">
															<option value="${single}"
																${(single == entity.orderStatus)?'selected':'' }>${single}</option>
														</c:forEach>
													</c:if></select>
											</div>
										</div>
									</div>
								</div>

								<!--paymentComment -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="paymentComment">Payment
												Comment :</label>
											<textarea name="paymentComment" class="span4 limit elastic"
												id="paymentComment" rows="3" cols="5">${entity.paymentComment}</textarea>
										</div>
									</div>
								</div>
								<!--deliveryComment -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="deliveryComment">Delivery
												Comment :</label>
											<textarea name="deliveryComment" class="span4 limit elastic"
												id="deliveryComment" rows="3" cols="5">${entity.deliveryComment}</textarea>
										</div>
									</div>
								</div>


								<!--ip -->




							</div>
							<div class="tab-pane" id="payment-tab">
								<!--addressLine1 -->


								<!--surName -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.surName">SurName :</label><input
												class="span4" id="billingAddressSnapshot.surName"
												name="surName" type="text"
												value="${entity.billingAddressSnapshot.surName}" />
										</div>
									</div>
								</div>
								<!--givenName -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.givenName">GivenName :</label>
												<input 	class="span4" id="billingAddressSnapshot.givenName"
												name="givenName" type="text"
												value="${entity.billingAddressSnapshot.givenName}" />
										</div>
									</div>
								</div>


								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.addressLine1">AddressLine1
												:</label><input class="span4"
												id="billingAddressSnapshot.addressLine1"
												name="billingAddressSnapshot.addressLine1" type="text"
												value="${entity.billingAddressSnapshot.addressLine1}" />
										</div>
									</div>
								</div>
								<!--addressLine2 -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.addressLine2">AddressLine2
												:</label><input class="span4"
												id="billingAddressSnapshot.addressLine2"
												name="billingAddressSnapshot.addressLine2" type="text"
												value="${entity.billingAddressSnapshot.addressLine2}" />
										</div>
									</div>
								</div>
								<!--city -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.city">City :</label><input
												class="span4" id="billingAddressSnapshot.city"
												name="billingAddressSnapshot.city" type="text"
												value="${entity.billingAddressSnapshot.city}" />
										</div>
									</div>
								</div>
								<!--state -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.state">State :</label><input
												class="span4" id="billingAddressSnapshot.state"
												name="billingAddressSnapshot.state" type="text"
												value="${entity.billingAddressSnapshot.state}" />
										</div>
									</div>
								</div>
								<!--postalCode -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.postCode">Post Code :</label><input
												class="span4" id="billingAddressSnapshot.postCode"
												name="billingAddressSnapshot.postCode" type="text"
												value="${entity.billingAddressSnapshot.postCode}" />
										</div>
									</div>
								</div>
								<!--country -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="billingAddressSnapshot.country">Country :</label><input
												class="span4" id="billingAddressSnapshot.country"
												name="billingAddressSnapshot.country" type="text"
												value="${entity.billingAddressSnapshot.liveCountry.name}" />
										</div>
									</div>
								</div>

							</div>
							<div class="tab-pane" id="shipping-tab">

								<!--surName -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.surName">SurName :</label><input
												class="span4" id="shippingAddressSnapshot.surName"
												name="surName" type="text"
												value="${entity.shippingAddressSnapshot.surName}" />
										</div>
									</div>
								</div>
								<!--givenName -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.givenName">GivenName :</label><input
												class="span4" id="shippingAddressSnapshot.givenName"
												name="givenName" type="text"
												value="${entity.shippingAddressSnapshot.givenName}" />
										</div>
									</div>
								</div>



								<!--addressLine1 -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.addressLine1">AddressLine1
												:</label><input class="span4"
												id="shippingAddressSnapshot.addressLine1"
												name="shippingAddressSnapshot.addressLine1" type="text"
												value="${entity.shippingAddressSnapshot.addressLine1}" />
										</div>
									</div>
								</div>
								<!--addressLine2 -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.addressLine2">AddressLine2
												:</label><input class="span4"
												id="shippingAddressSnapshot.addressLine2"
												name="shippingAddressSnapshot.addressLine2" type="text"
												value="${entity.shippingAddressSnapshot.addressLine2}" />
										</div>
									</div>
								</div>
								<!--city -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.city">City :</label><input
												class="span4" id="shippingAddressSnapshot.city"
												name="shippingAddressSnapshot.city" type="text"
												value="${entity.shippingAddressSnapshot.city}" />
										</div>
									</div>
								</div>
								<!--state -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.state">State :</label><input
												class="span4" id="shippingAddressSnapshot.state"
												name="shippingAddressSnapshot.state" type="text"
												value="${entity.shippingAddressSnapshot.state}" />
										</div>
									</div>
								</div>
								<!--postalCode -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.postCode">Post Code :</label><input
												class="span4" id="shippingAddressSnapshot.postCode"
												name="shippingAddressSnapshot.postCode" type="text"
												value="${entity.shippingAddressSnapshot.postCode}" />
										</div>
									</div>
								</div>
								<!--country -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="shippingAddressSnapshot.country">Country :</label><input
												class="span4" id="shippingAddressSnapshot.country"
												name="shippingAddressSnapshot.country" type="text"
												value="${entity.shippingAddressSnapshot.liveCountry.name}" />
										</div>
									</div>
								</div>
								<!--liveCountry -->

							</div>

							<div class="tab-pane" id="product-tab">
								<div class="row-fluid">

									<div class="span12">

										<div class="box gradient">

											<div class="title">
												<h4>
													<span>Item </span>
												</h4>
											</div>
											<div class="content noPad clearfix">
												<table cellpadding="0" cellspacing="0" border="0"
													class="dynamicTable display table table-bordered"
													width="100%">
													<thead>
														<tr>
															<th>Product</th>
															<th>Currency</th>
															<th>Quantity</th>
															<th>Unit Price</th>
															<th>Total</th>
															<th>Description</th>
														</tr>
													</thead>
													<tbody>
														<c:forEach var="entity" items="${entity.items}">
															<tr class="odd gradeX">
																<td>${entity.productId}</td>
																<td>${entity.ccy}</td>
																<td>${entity.amount}</td>
																<td>${entity.value}</td>
																<td>${entity.money}</td>
																<td>${entity.description}</td>
															</tr>
														</c:forEach>



													</tbody>

												</table>
												${ entity.subTotal} ${ entity.totalMoney}

											</div>

										</div>
										<!-- End .box -->

									</div>
									<!-- End .span12 -->

								</div>
								<!-- End .row-fluid -->



							</div>


							<div class="tab-pane" id="transation-tab">
								<div class="row-fluid">

									<div class="span12">

										<div class="box gradient">

											<div class="title">
												<h4>
													<span>Transations </span> <span
														class="box-form right orderTransation_bar"><a
														href="#" class="btn btn-mini addOrderTransation">Add
															Order Transation</a></span>
												</h4>
											</div>
											<div class="content noPad clearfix">
												<table cellpadding="0" cellspacing="0" border="0"
													class="dynamicTable display table table-bordered"
													width="100%">
													<thead>
														<tr>
															<th>Date</th>
															<th>Comment</th>
															<th>Status</th>
															<th>Notify</th>
														</tr>
													</thead>
													<tbody>
														<c:forEach var="entity" items="${entity.orderTransations}">
															<tr class="odd gradeX">
																<td>${entity.date}</td>
																<td>${entity.comment}</td>
																<td>${entity.orderStatus}</td>
																<td>${entity.notifyCustomer}</td>
															</tr>
														</c:forEach>



													</tbody>

												</table>
												${ entity.subTotal} ${ entity.totalMoney}

											</div>

										</div>
										<!-- End .box -->

									</div>
									<!-- End .span12 -->

								</div>
								<!-- End .row-fluid -->



							</div>



							<div class="tab-pane" id="customer-tab">
								<!--name -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="name">Name :</label><input
												class="span4" id="name" name="name" type="text"
												value="${entity.member.name}" />
										</div>
									</div>
								</div>
								<!--surName -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="surName">Sur
												Name :</label><input class="span4" id="surName" name="surName"
												type="text" value="${entity.member.surName}" />
										</div>
									</div>
								</div>
								<!--givenName -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="givenName">Given
												Name :</label><input class="span4" id="givenName" name="givenName"
												type="text" value="${entity.member.givenName}" />
										</div>
									</div>
								</div>
								<!--company -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="company">Company
												:</label><input class="span4" id="company" name="company"
												type="text" value="${entity.member.company}" />
										</div>
									</div>
								</div>
								<!--nric -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="nric">Nric :</label><input
												class="span4" id="nric" name="nric" type="text"
												value="${entity.member.nric}" />
										</div>
									</div>
								</div>
								<!--birthday -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="birthday">Birthday
												:</label><input class="span4 datepicker" id="birthday"
												name="birthday" type="text"
												value="<fmt:formatDate pattern="yyyy-MM-dd" value="${entity.member.birthday}" />" />
										</div>
									</div>
								</div>
								<!--gender -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="gender">Gender :</label><input
												class="span4" id="gender" name="gender" type="text"
												value="${entity.member.gender}" />
										</div>
									</div>
								</div>
								<!--maritalStatus -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="maritalStatus">Marital
												Status :</label><input class="span4" id="maritalStatus"
												name="maritalStatus" type="text"
												value="${entity.member.maritalStatus}" />
										</div>
									</div>
								</div>

								<!--address -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="address">Address
												:</label><input class="span4" id="address" name="address"
												type="text" value="${entity.member.address}" />
										</div>
									</div>
								</div>


								<!--email -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="email">Email :</label><input
												class="span4" id="email" name="email" type="text"
												value="${entity.member.email}" />
										</div>
									</div>
								</div>
								<!--citizenship -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="citizenship">Citizenship
												:</label><input class="span4" id="citizenship" name="citizenship"
												type="text" value="${entity.member.citizenship}" />
										</div>
									</div>
								</div>
								<!--remark -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="remark">Remark :</label><input
												class="span4" id="remark" name="remark" type="text"
												value="${entity.member.remark}" />
										</div>
									</div>
								</div>
								<!--mobile -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="mobile">Mobile :</label><input
												class="span4" id="mobile" name="mobile" type="text"
												value="${entity.member.mobile}" />
										</div>
									</div>
								</div>
								<!--registerDate -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="registerDate">Register
												Date :</label><input class="span4 datepicker" id="registerDate"
												name="registerDate" type="text"
												value="<fmt:formatDate pattern="yyyy-MM-dd" value="${entity.member.registerDate}" />" />
										</div>
									</div>
								</div>
								<!--approvedDate -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="approvedDate">Approved
												Date :</label><input class="span4 datepicker" id="approvedDate"
												name="approvedDate" type="text"
												value="<fmt:formatDate pattern="yyyy-MM-dd" value="${entity.member.approvedDate}" />" />
										</div>
									</div>
								</div>
								<!--salutation -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="salutation">Salutation
												:</label><input class="span4" id="salutation" name="salutation"
												type="text" value="${entity.member.salutation}" />
										</div>
									</div>
								</div>
								<!--telephone -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="telephone">Telephone
												:</label><input class="span4" id="telephone" name="telephone"
												type="text" value="${entity.member.telephone}" />
										</div>
									</div>
								</div>
								<!--fax -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="fax">Fax :</label><input
												class="span4" id="fax" name="fax" type="text"
												value="${entity.member.fax}" />
										</div>
									</div>
								</div>
								<!--newsLetter -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="newsLetter">News
												Letter :</label>
											<div class="left marginT5 marginR10">
												<div class="radio" id="uniform-newsLetter1">
													<span
														class="<c:if test="${entity.member.newsLetter }">checked</c:if>"><input
														type="radio" name="newsLetter" id="newsLetter1"
														value="true"
														<c:if test="${entity.member.newsLetter}">checked="checked"</c:if>
														style="opacity: 0;"></span>
												</div>
												True
											</div>
											<div class="left marginT5 marginR10">
												<div class="radio" id="uniform-newsLetter2">
													<span
														class="<c:if test="${!entity.member.newsLetter}">checked</c:if>"><input
														type="radio"
														<c:if test="${!entity.member.newsLetter}">checked="checked"</c:if>
														name="newsLetter" id="newsLetter2" value="false"
														style="opacity: 0;"></span>
												</div>
												False
											</div>
										</div>
									</div>
								</div>
								<!--type -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="type">Type :</label><input
												class="span4" id="type" name="type" type="text"
												value="${entity.member.type}" />
										</div>
									</div>
								</div>
								<!--dtype -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="dtype">Dtype :</label><input
												class="span4" id="dtype" name="dtype" type="text"
												value="${entity.member.dtype}" />
										</div>
									</div>
								</div>





							</div>

							<div class="tab-pane" id="user-access-tab">
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="userAccess.ip">Ip
												:</label><input class="span4" id="userAccess.ip" name="ip"
												type="text" value="${entity.userAccess.ip}" />
										</div>
									</div>
								</div>
								<!--agent -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="userAccess.agent">Agent
												:</label><input class="span4" id="userAccess.agent" name="agent"
												type="text" value="${entity.userAccess.agent}" />
										</div>
									</div>
								</div>
								<!--acceptLanguage -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3"
												for="userAccess.acceptLanguage">AcceptLanguage :</label><input
												class="span4" id="userAccess.acceptLanguage"
												name="acceptLanguage" type="text"
												value="${entity.userAccess.acceptLanguage}" />
										</div>
									</div>
								</div>
								<!--forwardedIp -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="userAccess.forwardedIp">ForwardedIp
												:</label><input class="span4" id="userAccess.forwardedIp"
												name="forwardedIp" type="text"
												value="${entity.userAccess.forwardedIp}" />
										</div>
									</div>
								</div>
								<!--url -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="userAccess.url">Url
												:</label><input class="span4" id="userAccess.url" name="url"
												type="text" value="${entity.userAccess.url}" />
										</div>
									</div>
								</div>
								<!--date -->
								<div class="form-row row-fluid">
									<div class="span12">
										<div class="row-fluid">
											<label class="form-label span3" for="userAccess.date">Date
												:</label><input class="span4 datepicker" id="userAccess.date"
												name="date" type="text"
												value="<fmt:formatDate pattern="yyyy-MM-dd" value="${entity.userAccess.date}" />" />
										</div>
									</div>
								</div>
							</div>





						</div>



					</div>


				</div>
			</div>
		</div>
	</div>
	<!-- End .span6 -->

</div>



<div id="orderTransationDiv" class="modal hide fade" reload="true"
	style="display: none;">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal">
			<span class="icon12 minia-icon-close"></span>
		</button>
		<h3>Order Transation</h3>
	</div>

	<div class="modal-body">
		<input type="hidden" name="action"> <input type="hidden"
			name="orderId" value="${entity.id}">
		<!--date -->
		<div class="form-row row-fluid">
			<div class="span12">
				<div class="row-fluid">
					<label class="form-label span3" for="date">Date :</label><input
						class="span4 datepicker" id="date" name="date" type="text"
						value="" />
				</div>
			</div>
		</div>
		<!--comment -->
		<div class="form-row row-fluid">
			<div class="span12">
				<div class="row-fluid">
					<label class="form-label span3" for="comment">Comment :</label><input
						class="span4" id="comment" name="comment" type="text" value="" />
				</div>
			</div>
		</div>
		<!--notifyCustomer -->
		<!--notifyCustomer -->
		<div class="form-row row-fluid">
			<div class="span12">
				<div class="row-fluid">
					<label class="form-label span3" for="notifyCustomer">NotifyCustomer
						:</label>
					<div class="left marginT5 marginR10">
						<div class="radio" id="uniform-notifyCustomer1">
							<span class="checked"><input type="radio"
								name="notifyCustomer" id="notifyCustomer1" value="true"
								checked="checked" style="opacity: 0;"></span>
						</div>
						True
					</div>
					<div class="left marginT5 marginR10">
						<div class="radio" id="uniform-notifyCustomer2">
							<span class=""><input type="radio" name="notifyCustomer"
								id="notifyCustomer2" value="false" style="opacity: 0;"></span>
						</div>
						False
					</div>
				</div>
			</div>
		</div>
		<!--orderStatus -->
		<div class="form-row row-fluid">
			<div class="span12">
				<div class="row-fluid">
					<label class="form-label span3">Order Status :</label>
					<div class="span4 controls">
						<select name="orderStatus"><c:if
								test="${not empty orderStatuses}">
								<c:forEach var="single" items="${orderStatuses}">
									<option value="${single}">${single}</option>
								</c:forEach>
							</c:if></select>
					</div>
				</div>
			</div>
		</div>



	</div>

	<div class="modal-footer">
		<a href="#" class="btn" data-dismiss="modal">Close</a> <a href="#"
			class="btn btn-primary modal-submit">Save changes</a>
	</div>

</div>
<!-- end item -->
<script>
	$(document).ready(
			function() {

				$('.addOrderTransation').click(
						function() {
							$("#orderTransationDiv").find("div.modal-body")
									.find("input,select,textarea,checkbox")
									.not("[name=action],[type=hidden]").not(
											"[type=radio]").each(
											function(step, value) {
												$(value).val("");
											});

							$("#orderTransationDiv input[name='action']").val(
									"${ctx}/admin/order-transation/create/");
							$("#orderTransationDiv").modal('show');
						});
			});
</script>